package com.example.reademe.interrupt;

/**
 * @author shishaopeng
 * Date: 2023-10-07-14-29
 * Desc:
 */
public class InterruptTaskExample {

    public static void main(String[] args) throws InterruptedException {
        Thread interruptTask = new InterruptTask();
        interruptTask.start();
        Thread.sleep(1000);
        // 给 interruptTask 发送中断信号
        interruptTask.interrupt();
    }
}
